package com.qianli.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.qianli.pojo.User;
import com.qianli.service.UserService;

public class UserAction extends ActionSupport implements SessionAware{
	
	private static final long serialVersionUID = 1L;
	private UserService userService;
	private Map<String, Object> session;
	private User user;
	private List<User> userList;
	public String execute(){
		return "success";
	}
	public String login(){
		User u=userService.login(user);
		
		session.put("curr_user", u);
		return "success";
	}

	
	
	
//get set
	
	
	
	
	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public List<User> getUserList() {
		return userList;
	}
	public void setUserList(List<User> userList) {
		this.userList = userList;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public void setSession(Map<String, Object> session) {
	this.session=session;
		
	}
	

}
